import { get, post, Delete } from "../utlis/http.js"

export const approvehttp = {
  // 配方审批添加
  recipeApproveLogAdd (param) {
    return post(`/recipeApproveLog/add`, param)
  },
  // 配方审批修改
  recipeApproveLogEdit (param) {
    return post(`/recipeApproveLog/modify`, param)
  },
  // 查询配方审批列表
  recipeApproveLogList (param) {
    if (param.field) {
      return post(`/recipeApproveLog/list?page=${param.page}&size=${param.size}&sort=${param.field},${param.order}`, param)
    } else {
      return post(`/recipeApproveLog/list?page=${param.page}&size=${param.size}`, param)
    }

  },
  //删除配方审批记录
  removeRecipeApproveLog (id) {
    return Delete(`/recipeApproveLog/remove/${id}`)
  },
  //查询当前配方审批记录
  getCurrApproveLog (id) {
    return get(`/recipeApproveLog/find/${id}`)
  },
  //查询工单审批记录
  woApproveLogList (param) {
    if (param.field) {
      return post(`/woApproveLog/list?page=${param.page}&size=${param.size}&sort=${param.field},${param.order}`, param)
    } else {
      return post(`/woApproveLog/list?page=${param.page}&size=${param.size}`, param)
    }

  },
  //添加工单审批记录
  woApproveLogAdd (param) {
    return post(`/woApproveLog/add`, param)
  },
  //查询当前工单审批记录
  getCurrWoidApproveLog (id) {
    return get(`/woApproveLog/find/${id}`)
  },
  //修改工单审批记录
  woApproveLogModify (param) {
    return post(`/woApproveLog/modify`, param)
  },
  //删除工单审批记录
  removeWoApproveLog (id) {
    return Delete(`/woApproveLog/remove/${id}`)
  },
}